feat(composer): edit shared posts and share-to-squad in the new composer - #6422
Open
tsahimatsliah wants to merge 22 commits into
Open
feat(composer): edit shared posts and share-to-squad in the new composer#6422tsahimatsliah wants to merge 22 commits into
tsahimatsliah wants to merge 22 commits into
Conversation
Editing a shared link still opened the old /posts/[id]/edit page: the menu only routed freeform and welcome posts to SmartComposerModal, and the modal forced kind to 'text' whenever editPost was set, so it could not represent a share at all. - Derive the kind from editPost.type, prefill the commentary the way the old page did (a share with no commentary carries the shared post's own title, which is not the author's text), and seed the preview from the post rather than refetching it - Lock the URL while editing: only the commentary is editable, matching what the API accepts - Add the missing edit branch to submitLink, including the moderation path, which completes without a toast of its own - Route share posts to the modal; moderation items keep the page, which edits a pending submission the composer cannot represent - Delete CreateLiveRoomForm and CreatePoll, referenced by nothing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Squad share triggers (ShareBar, DiscussionShareRow, Share modal) now open SmartComposerModal seeded with the post as the link preview and the squad preselected, replacing CreateSharedPostModal. The composer's link flow already covers internal shares (preview.id -> addPostToSquad, moderation, multi-squad via sharedPostId), so the old modal is deleted along with its lazy-modal registration. A new onPosted callback carries the ShareToSquad analytics event that the old modal's onSharedSuccessfully used to fire. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A composer opened pre-filled (share-to-squad, ?share= deep links) counted its own seed as unsaved changes, so closing it untouched asked to discard a draft the user never wrote. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comments explaining what the code already says, narrating fixed bugs, or restating test names are removed; the ones that survive state constraints the code cannot show (platform quirks, cross-file contracts, do-not-readd traps). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t-post-new-composer
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- share-edit save now shows its in-flight state (isUpdatePostLoading joins isPosting) - the mobile composer drawer portals to the root, so opening it from the Share modal's drawer no longer traps it in a transformed ancestor - editing always targets the post's own source instead of falling back to the personal audience when the squad is no longer postable - a moderated share edit is no longer logged as a post creation - the share-edit dirty check trims like the seed comparison does - a locked link with no surviving shared post renders no empty preview card - CommentMarkdownInput skips the visualViewport subscription when it fills its container (the value was discarded) - the locked-link no-refetch spec now actually exercises the guard Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Live verification found two defects: a freeform post with no body (title + cover) could never save a title edit because submit demanded a body, and the desktop 'Add a comment' composer opened unfocused — the by-id focus helper races the lazy chunk and TipTap's async editor, so the composer now owns its focus through the queued autofocus path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t-post-new-composer
…t-post-new-composer
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t-post-new-composer
8 tasks
…2e164b' into claude/edit-post-new-composer
The base branch backed the edit-validation relaxation out of the comments PR; it belongs here, where useComposerSubmit.spec covers it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rebelchris
changed the base branch from
main
to
claude/mobile-comment-input-fix-2e164b
August 27, 2026 14:12
…2e164b' into claude/edit-post-new-composer
…t-post-new-composer
The submit helpers now take the narrowed Squad instead of casting primary ten times, the createMulti payloads drop their as-unknown casts (they already match CreatePostInMultipleSourcesArgs), and the defaultWriteTab key lookup uses a type guard instead of a double cast. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Two remaining old-composer surfaces move to
SmartComposerModal: editing a shared post and sharing a post to a squad.Editing a share in the composer
Editing a shared link still opened the old
/posts/[id]/editpage, with the old top-toolbar editor, while every other composer surface had moved toSmartComposerModal.Two reasons, not one:
PostOptionButtononly routed Freeform and Welcome posts to the modal; everything else fell through torouter.push('<permalink>/edit').kind = 'text'whenevereditPostwas set — it had no way to represent a share.What changed:
editPost.typeinstead of hard-coded totext.editPost.sharedPostinstead of being refetched — there is no URL being typed for it to resolve.LinkForm isUrlLocked): only the commentary is editable, which is allupdateSquadPostaccepts. The URL field and the preview's remove button are dropped, and focus starts in the commentary.submitLinkgained the edit branch it never had — onlysubmitTexthandlededitPostId. It routes throughonUpdateSharePost, including the moderation path, which completes without a toast of its own (the plain update path already toasts fromusePostToSquad, so adding one there would double it).Share to squad through the composer
Clicking a squad avatar in
ShareBar,DiscussionShareRow, or the Share modal openedCreateSharedPostModal— the old editor. All three now openSmartComposerModalseeded for the share:preview={post},initialUrl={post.permalink}), so nothing is refetched and the composer's existing internal-share path applies:preview.id → addPostToSquad, moderation when the squad requires it, and multi-squad sharing viasharedPostId— a capability the old modal never had.initialSquadId, but the audience stays editable.onPostedcallback onSmartComposerModalcarries theShareToSquadanalytics event the old modal fired fromonSharedSuccessfully.CreateSharedPostModalis deleted along with its spec and itsLazyModalregistration;SocialSharerenders the composer inline for the same dep-cycle reason it rendered the old modal inline.What deliberately did not move
/posts/[id]/edit. That page edits a pending submission (useSourcePostModerationById), which is a different entity from a post — the composer cannot represent it.LiveRoomChatPanelstays as it is. It is a chat input, not a post composer: one line, send-on-enter, in a sidebar. A full-screen drawer and a bottom action bar would make it worse.ControlledMarkdownInput(profile bio) is a plain markdown field, not a composer.Dead code removed
CreateSharedPostModal,CreateLiveRoomForm, andCreatePollwere each left referenced by nothing (or only their own specs), so they are deleted rather than carried forward.Events
No new tracking events —
StartShareToSquad/ShareToSquadkeep firing from the same triggers.Experiment
No new experiments.
Preview domain
https://claude-edit-post-new-composer.preview.app.daily.dev